1. Field of the Invention
This invention pertains generally to packet loss calculation schemes. In particularl, the invention is a method and apparatus for accurately calculating packet loss along a communication channel using data in a pair of measuring packets.
2. The Prior Art
Communication circuits and permanent virtual circuits (PVC's) are known for establishing a connection between two networks and nodes between the two networks. Common PVC's utilizing the Internet's infrastructure include frame-relay, ATM (asynchronous transfer mode), and IP VPN (Internet protocol virtual private network), among others.
A prior art system will normally include a source node S and a destination node D. Node S residing in a first network A is coupled to node D residing in a remote network B by a PVC. The PVC carries out the operation of communicating data packets between node S and node D. Each node, S and D, may comprise any data processing means, but more commonly comprises a router device as is known in the art. Often there is need for measuring the packet loss arising from traffic between node S and node D. For example, network service providers (providing the PVC channel) and their customers (users of node S and node D) use packet loss as part of their service level agreements. Thus, there is a need for accurately calculating packet loss through channels such as PVC.
Prior art implementations for calculating packet loss through a PVC generally comprise an application residing somewhere in one of the networks (A or B). In operation, this application queries node S for the number of packets transmitted to node D by node S (packets sent). The application also queries node D (preferably at the same time as the query to S2) for the number of packets received from node S by node D (packets received). Each of the nodes D and S maintain a conventional counter for packets sent and received by the respective node. In response to the application's query, the nodes D and S provide the requested value. The application then determines the packet loss from the values provided by nodes S and D, wherein:packet loss=packets sent−packets received.
There are, however, disadvantages with the prior art implementation described above. First, there is often latency in communications between node S and the application and/or between node D and the application as is known in the art. Accordingly, it may be difficult for the application to query the nodes S and D at the same time. If the nodes S and D are not queried at the same time, the packets sent and packets received values provided by the corresponding nodes may be inaccurate, and thus the resulting packet loss calculation is also inaccurate. Second, even if the nodes S and D are queried at the same time, there may be packets in transit between nodes S and D. These packets, which may arrive at node D, are not included in the count for packets received by node D since at the time the simultaneous query is made, the packets are still in transit and have not arrived a node D. Thus, the packets sent and packets received values provided by the nodes S and D may be inaccurate, resulting in an inaccurate packet loss calculation.
Accordingly, there is a need for a method and apparatus for accurately calculating packets loss communicated over a communication circuit. The present invention satisfies these needs, as well as others, and generally overcomes the deficiencies found in the background art.